<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/tag.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>智能选股系统</title>
    <%@ include file="/common_js.jsp" %>
    <%@ include file="/common_css.jsp" %>
    <script type="application/javascript">

        $(function () {

            $('#user_list_id').datagrid({
                url: '${baseurl}user/list',
                toolbar: "#user_toolbar_id"
            });


        });

    </script>
</head>
<body class="easyui-layout" style="overflow-y: hidden" fit="true" scroll="no">

<table id="user_list_id" style="width:100%;height:100%;"
       data-options="fitColumns:true,singleSelect:true,pagination:true,pagePosition:'bottom'">
    <thead>
    <tr>
        <th data-options="field:'id',width:20">id</th>
        <th data-options="field:'username',width:20">登陆名</th>
        <th data-options="field:'realname',width:20">姓名</th>
        <th data-options="field:'department',width:20,formatter:function(value,row,index){
	            		if(value=='' || value == null){
	            			return '开发公司';
	            		}else{
	            			return value;
	            		}
	           		}">所属部门
        </th>
        <th data-options="field:'roles',width:20">拥有角色</th>
        <th data-options="field:'lastLoginDate',width:20,formatter:function(value,row,index){
            			return dateFormatter_yyyyMMddHHmmss(value);
            		}">上次登录时间
        </th>

        <th data-options="field:'locked',width:20,formatter:function(value,row,index){
            			if(value) return '<span style=color:red onclick=lock('+row.id+')>是</span>';
            				return '<span onclick=lock('+row.id+')>否</span>';
            		}">是否锁定
        </th>
    </tr>
    </thead>
</table>

<!-- 数据表格toolbar -->
<div id="user_toolbar_id">
    <a id="user_add_id" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增 </a>
    <a id="user_update_id" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
    <a id="user_delete_id" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
</div>
</body>
</html>